/*
   @Copyright:LeetCode
   @Author:   tjyemail
   @Problem:  http://leetcode.com/problems/excel-sheet-column-title
   @Language: C++
   @Datetime: 19-11-27 16:05
   */

class Solution {
public:
	string convertToTitle(int n) {
		string res;
		for(; n; n=(n-1)/26)
			res.push_back('A'+(n-1)%26);
		reverse(res.begin(),res.end());
		return res;
	}
};
